<?php


namespace App\Http\Controllers\Api;


use App\library\services\NewHouseService;
use App\Models\NewHouse;
use Illuminate\Http\Request;

class NewHouseController
{
    /**
     * Author:YangXinPeng
     * 根据楼盘ID获取户型信息
     * @param Request $request
     * @return mixed
     */
   public function getByBid(Request $request)
   {
       $buildingId = $request->get('id');
       if (!is_numeric($buildingId)){
           return $this->fail('参数错误');
       }
       $res = NewHouseService::getDataByBid($buildingId);
       return $res;
   }
}
